This patch fixes an error in the xm create path when the
authoremellor@ewan <emellor@ewan>
Mon, 10 Oct 2005 18:06:14 +0000 (19:06 +0100)
committeremellor@ewan <emellor@ewan>
Mon, 10 Oct 2005 18:06:14 +0000 (19:06 +0100)
xc.domain_create call fails (eg, when ACM policy prevents creation of a
domain).  When xc.domain_create fails, dompath never gets set.

Signed-off-by: Tom Lendacky <toml@us.ibm.com>
tools/python/xen/xend/XendDomainInfo.py

index c9711808a87f5024f8acb01e7955d7634fd211fe..cc949d15e031666b64719b862a3aba6cd2e1e56b 100644 (file)
@@ -1087,7 +1087,8 @@ class XendDomainInfo:
         log.debug("XendDomainInfo.destroy: domid=%s", self.domid)
 
         self.cleanupVm()
-        self.destroyDomain()
+        if self.dompath is not None:
+                self.destroyDomain()
 
 
     def destroyDomain(self):